package homework3;

import java.util.HashMap;
import java.util.Scanner;
import java.util.Set;

public class Students {
	public static void main(String[] args) {
		HashMap<String, Integer> students = new HashMap<String, Integer>();
		students.put("张三", 88);
		students.put("李四", 45);
		students.put("王五", 63);
		students.put("赵六", 94);
		Scanner input = new Scanner(System.in);
		System.out.println("输入学生姓名：");
		String key = input.next();
		System.out.println(key + "的成绩是" + students.get(key));

		System.out.println("-------所有学生的成绩是--------");
		Set<String> keys = students.keySet();
		for (String key1 : keys) {
			System.out.println(key1 + "的成绩是：" + students.get(key1));
		}
	}
}
